package com.j170502.cateringmange.util;

import java.io.FileInputStream;
import java.io.FileWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Timer;
import java.util.TimerTask;

public class Test {
    public static void main(String[] args) throws Exception {
//        FileInputStream fin = new FileInputStream("E:\\练习.txt");
//        byte[] bs = new byte[100];
//        while(true){
//            int len = fin.read(bs);
//            if(len <= 0) break;
//            System.out.print(new String(bs,0,len));
        FileWriter fw = new FileWriter("E:\\练习.txt");
        fw.write("hello world!" + System.getProperty("line.separator"));
        fw.write("你好！北京！");
        fw.close();
//    public static void timer1() {
//             Timer timer = new Timer();
//             timer.schedule(new TimerTask() {
//                 public void run() {
//                        System.out.println("-------设定要指定任务--------");
//                       }
//     }, 1000,2000);// 设定指定的时间time,此处为2000毫秒
//           }

    }
}
